package com.zxy.demo.java.enumdemo;

/**
 * ExceptionCodeEnum.
 * 
 * Created by zxybird on 17/1/23.
 */
public enum ExceptionCodeEnum {

  UNKNOWN_EXCEPTION(0, "未知的异常"),
  // hah
  DAO_EXCEPTION(1, "dao excetion"),

  // xixi
  SERVICE_EXCEPTION(2, "service_exception");

  private int code;

  private String msg;

  ExceptionCodeEnum(int code, String msg) {
    this.code = code;
    this.msg = msg;
  }

  public int getCode() {
    return code;
  }

  public void setCode(int code) {
    this.code = code;
  }

  public String getMsg() {
    return msg;
  }

  public void setMsg(String msg) {
    this.msg = msg;
  }

  public static void main(String[] args) {
    ExceptionCodeEnum excodeEnum = ExceptionCodeEnum.DAO_EXCEPTION;
  }
}
